package com.itfreer.xjmh.cycle;


import com.itfreer.form.api.StatisticsInfo;
import com.itfreer.utils.ResponseEntity;
import com.itfreer.xjmh.temporary.TemporaryShowService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("/cycleairsecurityshow")
@Api("临时数据展示")
public class RestCycleAirSecurityShowServicce {
    @Autowired(required = false)
    private CycleAirSecurityShowService service;

    @PostMapping(
            value = {"/getShowData"},
            produces = {"application/json"}
    )
    public ResponseEntity<List<StatisticsInfo>> getStatistics(@RequestBody Map<String, Object> where) {
        return new ResponseEntity(service.getShowData(where));
    }

    @PostMapping(
            value = {"/getShowDate"},
            produces = {"application/json"}
    )
    public ResponseEntity<List<StatisticsInfo>> getStatistics() {
        return new ResponseEntity(service.getShowDate());
    }
}
